<link rel="stylesheet" href="{{URL::asset('./css/hrmy/menu.css')}}">
<style>
    .hrMenu_header_content a>img {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
</style>
<div class="main" id="hrMenu" v-cloak>
    <div class="hrMenu_header">
        <div class="hrMenu_header_content">
            {{--<img :src="userInfo.avatar">--}}
            <a href="{{route('home.hrmy.hrIndex') }}"><img :src="userInfo.avatar"></a>
            <span>@{{userInfo.username}}</span>
            <div class="myBind">
                <p>
                    <span :class="{active:userInfo.is_wechat==0}">
                        <a v-if="userInfo.is_wechat==1" href="{{route('home.hrmy.hrSafeWeixin') }}">
                            <img src="{{URL::asset('./img/icon/myWx.png')}}">
                            <span >已绑定</span>
                        </a>
                        <a v-else href="{{route('home.weixin.login')}}">
                            <img src="{{URL::asset('./img/icon/myWx.png')}}">
                            <span >未绑定</span>
                        </a>
                    </span>
                    <span :class="{active:userInfo.is_qq==0}">
                        <a v-if="userInfo.is_qq==1" href="{{route('home.hrmy.hrSafeQQ') }}">
                            <img src="{{URL::asset('./img/icon/myQq.png')}}">
                            <span >已绑定</span>
                        </a>
                        <a v-else href="{{route('home.qq.login')  }}">
                            <img src="{{URL::asset('./img/icon/myQq.png')}}">
                            <span >未绑定</span>
                        </a>
                    </span>
                </p>
                <p>
                    <span :class="{active:userInfo.is_mobile==0}">
                        <a href="{{route('home.hrmy.hrSafePhone') }}">
                            <img src="{{URL::asset('./img/icon/myTel.png')}}">
                            <span v-if="userInfo.is_mobile==1">已绑定</span>
                            <span v-else>未绑定</span>
                        </a>
                    </span>
                    <span :class="{active:userInfo.is_password==0}">
                        <a href="{{route('home.hrmy.hrSafePass') }}">
                            <img src="{{URL::asset('./img/icon/mySetting.png')}}">
                            <span v-if="userInfo.is_password==1">已设置</span>
                            <span v-else>未设置</span>
                        </a>
                    </span>
                </p>
            </div>
        </div>
        <div class="s-footer"></div>
    </div>
    <div class="hrMenu_menu">
        <div class="hrMenu_menu_content">
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">账户管理</a>
                    <div>
                        <p><a :class="{active:showNab=='hrinfo' || showNab=='hrinfoedit'}" href="{{route('home.hrmy.hrInfo') }}">基础信息</a></p>
                        <p><a :class="{active:showNab=='hrsafe' || showNab=='hrsafepass' || showNab=='hrsafephone'  || showNab=='hrsafeweixin' || showNab=='hrsafeqq'}" href="{{route('home.hrmy.hrSafe') }}">安全中心</a></p>
                        <p><a :class="{active:showNab=='hraddress' || showNab=='hraddressadd'}" href="{{route('home.hrmy.hrAddress') }}">收货地址</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的资产</a>
                    <div>
                        <p><a :class="{active:showNab=='hrassets' || showNab=='hrassetsconsume'  || showNab=='hrcashout'}" href="{{route('home.hrmy.hrAssets') }}">资产管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的订单</a>
                    <div>
                        <p><a :class="{active:showNab=='hrorder'}" href="{{ route('home.cart.cartList') }}">购物车</a></p>
                    </div>
                    <div>
                        <p><a :class="{active:showNab=='hrorder'}" href="{{route('home.hrmy.hrOrder') }}">订单管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的发布</a>
                    <div>
                        <p><a :class="{active:showNab=='hrdemand'}" href="{{route('home.hrmy.hrDemand') }}">需求管理中心</a></p>
                        <p><a href="{{route('home.demand.demandAdd') }}">发布需求</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的收藏</a>
                    <div>
                        <p><a :class="{active:showNab=='hrcollectstore'}" href="{{route('home.hrmy.hrCollectStore') }}">收藏的店铺</a></p>
                        <p><a :class="{active:showNab=='hrcollectgoods'}" href="{{route('home.hrmy.hrCollectGoods') }}">收藏的商品</a></p>
                        <p><a :class="{active:showNab=='hrcollectword'}" href="{{route('home.hrmy.hrCollectWord') }}">收藏的文档</a></p>
                        <p><a :class="{active:showNab=='hrcollectnews'}" href="{{route('home.hrmy.hrCollectNews') }}">收藏的新闻资讯</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">下载记录</a>
                    <div>
                        <p><a :class="{active:showNab=='hrdownloadword'}" href="{{route('home.hrmy.hrDownloadWord') }}">下载的文档</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的活动</a>
                    <div>
                        <p><a :class="{active:showNab=='hractivity'}" href="{{route('home.hrmy.hrActivity') }}">活动管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的足迹</a>
                    <div>
                        <p><a :class="{active:showNab=='hrfootprint'}" href="{{route('home.hrmy.hrFootprint') }}">浏览记录</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">
                        站内消息
                        
                    </a>
                    <div>
                        <p><a :class="{active:showNab=='hrmail'}" href="{{route('home.hrmy.hrMail') }}">消息查看中心(<span>@{{userInfo.massage}}</span>)</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">
                        投诉建议
                    </a>
                    <div>
                        <p><a :class="{active:showNab=='hrfeedback'||showNab=='hrfeedbackadd'||showNab=='hrfeedbackdetails'}" href="{{route('home.hrmy.hrFeedBack') }}">投诉与建议</a></p>
                        <p><a :class="{active:showNab=='hrcustomerservice'}" href="{{route('home.hrmy.hrCustomerService') }}">联系客服</a></p>
                    </div>
                </span>
            </div>
        </div>
        <div class="s-header"></div>
    </div>
</div>
@section('scripts')
<script>
    $(() => {
        let hrMenu = new Vue({
            el: '#hrMenu',
            data: () => {
                return {
                    showNab: "",
                    userInfo: {},
                }
            },
            created() {
                let pathnameArr = window.location.pathname.split('/');
                this.showNab = pathnameArr[(pathnameArr.length - 1)];
                let data = {}
                apiAjax("{{ route('home.user.userInfoApi')}}", 'get', data, (res) => {
                    if (res.code == 0) {
                        this.userInfo = res.data;
                    } else {
                        this.$message({
                            message: res.msg,
                            type: 'warning'
                        });
                    }
                }, (erro) => {

                });
            },
            mounted() {},
            methods: {}
        })
    })
</script>
@endsection